﻿// =================================================================== 
// 项目说明
//====================================================================
// wup。@Copy Right 2014
// 文件： Applications.cs
// 项目名称：买车网
// 创建时间：2015/6/24
// 负责人：wup
// ===================================================================
using System;
using System.Collections.Generic;
using System.Text;
using Weixin.DAL.ChinaTax;
using Weixin.Entity.ChinaTax;

namespace Weixin.BLL.ChinaTax
{
    public partial class ApplicationsBLL : BaseBLL< ApplicationsBLL>

    {
        ApplicationsDataAccessLayer applicationsdal;
        public ApplicationsBLL()
        {
            applicationsdal = new ApplicationsDataAccessLayer();
        }

        public int Insert(ApplicationsEntity applicationsEntity)
        {
            return applicationsdal.Insert(applicationsEntity);            
        }

        public void Update(ApplicationsEntity applicationsEntity)
        {
            applicationsdal.Update(applicationsEntity);
        }

        public ApplicationsEntity GetAdminSingle(int appId)
        {
           return applicationsdal.Get_ApplicationsEntity(appId);
        }

        public IList<ApplicationsEntity> GetApplicationsList()
        {
            IList<ApplicationsEntity> applicationsList = new List<ApplicationsEntity>();
            applicationsList=applicationsdal.Get_ApplicationsAll();
            return applicationsList;
        }
        /// <summary>
        /// 根据课程Id获取报名人员
        /// </summary>
        /// <param name="cid">课程Id</param>
        /// <returns>报名人员列表</returns>
        public IList<ApplicationsEntity> GetApplicationsList(int cid)
        {
            IList<ApplicationsEntity> applicationsList = new List<ApplicationsEntity>();
            applicationsList = applicationsdal.GetApplicationsList(cid);
            return applicationsList;
        }
        /// <summary>
        /// 根据课程Id获取报名人员
        /// </summary>
        /// <param name="ids">逗号分割课程Id字符串</param>
        /// <returns>报名人员列表</returns>
        public IList<ApplicationsEntity> GetApplicationsList(string ids)
        {
            IList<ApplicationsEntity> applicationsList = new List<ApplicationsEntity>();
            applicationsList = applicationsdal.GetApplicationsList(ids);
            return applicationsList;
        }
    }
}
